From: Robert Timm <mail@rtti.de>
Date: Mon, 17 Apr 2017 21:22:39 +0000 (+0200)
Subject: adds TODO for text buffer change warning
X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/git?a=commitdiff_plain;h=3343d86284998a34190ac02de116dcb7bb97aa4e;p=vimb.git

adds TODO for text buffer change warning
---

diff --git a/src/ex.c b/src/ex.c
index 20e0eaa..0949f55 100644
--- a/src/ex.c
+++ b/src/ex.c
@@ -380,6 +380,16 @@ void ex_input_changed(Client *c, const char *text)
         gtk_text_buffer_get_iter_at_line(buffer, &start, 0);
         if (gtk_text_iter_forward_to_line_end(&start)) {
             gtk_text_buffer_get_end_iter(buffer, &end);
+
+            /* TODO the following line creates a GTK warning.
+             * ex_input_changed() is called from the "changed" event handler of
+             * GtkTextBuffer. Apparently it's not supported to change a text
+             * buffer in the changed handler!?
+             *
+             * Gtk-WARNING **: Invalid text buffer iterator: either the
+             * iterator is uninitialized, or the characters/pixbufs/widgets in
+             * the buffer have been modified since the iterator was created.
+             */
             gtk_text_buffer_delete(buffer, &start, &end);
         }
     }